﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace Test.Expressions
{
	/// <summary>
	/// Extended node types for custom expressions
	/// </summary>
	public enum DbExpressionType
	{
		Table = 1000, // make sure these don't overlap with ExpressionType
		Select,
		CrossApply,
		Subquery,		
		Join,		
		LeftJoin,		
		Min, Max, Average, Count, Sum,		
		Column,

		/*predicates*/
		//AndOrComparison,//catch-all for any other predicate expressions
		//Where,
		//On,
		Exists,
		//Empty,//sentinel value for predicate stack
	}
	public abstract class DbExpression : Expression
	{
		protected DbExpression(DbExpressionType nodeType, Type type)
		:base(((ExpressionType)nodeType), type){

		}
	
		public override string ToString() {
			return Enum.GetName(typeof(DbExpressionType), this.NodeType);
		}
	}

	

}
